@import "~pc/styles/lib_var.less";

@keyframes fadeIn {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

.hover {
  background-color: var(--rowSelectedBg);
}
.searchWrapper {
  width: 100%;
  height: 100%;
  transform-origin: right center;
  animation: fadeIn 0.3s ease;
  display: flex;
  flex-direction: column;
  .searchContent {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    flex: 1;
    overflow: hidden;
  }
  .search {
    .searchInput {
      padding: 0 16px;
      text-indent: 0;
      width: 100%;
      height: 40px;
      border-color: var(--borderCommonDefault);
      &:focus-within {
        border-color: var(--borderBrandDefault);
      }
      :global {
        .ant-input-prefix {
          margin-right: 2px;
        }
      }
    }
  }

  .closeBtn {
    display: flex;
    cursor: pointer;
  }

  .nodeList {
    position: absolute;
    padding: 0 16px;
    top: 96px;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1;
    flex: 1;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: scroll;
    border-radius: 0 0 8px 8px;
  }

  .emptyResult {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateY(-70px);
    max-width: 100%;
    width: 320px;
    margin: 0 auto;

    img {
      width: 100%;
    }

    .tip {
      font-size: 14px;
      color: var(--secondLevelText);
      margin-top: 8px;
      text-align: center;
    }
  }

  .title {
    height: 32px;
    font-size: 12px;
    color: var(--thirdLevelText);
    line-height: 32px;
    margin-left: 20px;

    &:nth-child(1) {
      margin-top: 8px;
    }
  }
}

.modalHeader {
  display: flex;
  align-items: center;
  .titleSearchIcon {
    margin-right: 10px;
  }
}

.modalWrapper {
  height: calc(100vh - 160px) !important;
  :global {
    .ant-modal-header {
      padding: 16px;
    }
    .ant-modal-body {
      flex: 1;
      padding: 0 !important;
    }
    .ant-modal-content {
      height: 100%;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
  }
}

.tabWrapper {
  display: flex;
  align-content: center;
  padding: 16px 0;
  overflow-x: auto;
  .typeTabItem {
    padding: 3px 8px;
    font-size: 12px;
    line-height: 18px;
    color: var(--textCommonPrimary);
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
  }
  .typeTabItemActive {
    background-color: var(--bgBrandLightDefault);
    color: var(--textBrandDefault);
  }
}

.defaultContent {
  max-width: 100%;
  width: 358px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(-70px);
  img {
    width: 100%;
  }
}

.footerTips {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bgControlsDegradeDefault);
  border-radius: 0 0 8px 8px;
  .footerIconBox {
    padding: 4px;
    background-color: var(--bgControlsElevateDefault);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }
}
.footerTipsEsc {
  justify-content: end;
  .footerIconBox {
    padding: 1px 8px;
  }
}

.loadingWrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  transform: translateY(-16px);
  .loading {
    position: inherit;
    background-color: transparent;
    margin-bottom: 10px;
  }
}
